import Layout from '@/layout'

const announcementRouter = {
  path: '/announcement',
  component: Layout,
  redirect: '/announcement/list',
  name: 'Announcement',
  meta: {
    title: '公告管理',
    icon: 'el-icon-message'
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/announcement/index'),
      name: 'AnnouncementList',
      meta: { title: '公告列表', icon: 'list' }
    },
    {
      path: 'template',
      component: () => import('@/views/announcement/template'),
      name: 'AnnouncementTemplate',
      meta: { title: '公告模板', icon: 'el-icon-document' }
    },
    {
      path: 'center',
      component: () => import('@/views/announcement/user-center'),
      name: 'AnnouncementCenter',
      meta: { title: '公告中心', icon: 'el-icon-bell' }
    },
    {
      path: 'detail/:id',
      component: () => import('@/views/announcement/detail'),
      name: 'AnnouncementDetail',
      meta: { title: '公告详情', activeMenu: '/announcement/list' },
      hidden: true
    }
  ]
}

export default announcementRouter 